from huggingface_hub import snapshot_download

# # 设置目标路径
# local_dir = "dataset/ChnSentiCorp"
#
# # 下载数据集 到本地
# snapshot_download(
#     repo_id="lansinuote/ChnSentiCorp",
#     repo_type="dataset",
#     local_dir=local_dir,
#     local_dir_use_symlinks=False,
#     resume_download=True
# )
# pip install datasets -i https://pypi.tuna.tsinghua.edu.cn/simple
from datasets import load_dataset, load_from_disk
books = load_dataset("lansinuote/ChnSentiCorp",cache_dir="dataset")
books.save_to_disk("dataset/ChnSentiCorp")